/**
 *
 * @param {Object} arg1
 * @param {Object} argN
 * @returns {Object} First argument
 */
function mix()/**Object*/{
    var a = arguments;
    if (!a.length) return;
    if (undefined == a[0]) a[0] = {};
    for (var i = 1, l = a.length; i < l; ++i) {
        for (var k in a[i]) {
            if (!(k in a[0])) {
                a[0][k] = a[i][k];
            }
        }
    }
    return a[0];
}

/**
 *
 * @class
 */
var Array = {
    /**
     *
     * @function
     * @param {Array} a Source array
     * @param {mixed} item
     * @returns {Number} -1 Item not found
     * @returns {Number} Position in array
     */
    indexOf: function(/**Array*/a,/**mixed*/item)/**Number*/{
        for (var i = a.length - 1; i > -1; --i) {
            if (a[i] === item) return i;
        }
        return -1;
    },

    values: function(/**Array*/a){

    }
};

var Object = {
    /**
     *
     * @function
     * @param {mixed} o
     */
    type: function(/**mixed*/o)/**String*/{
        return Object.prototype.toString.call(o).replace(/^\[object\s/, '').replace(/]$/, '');
    },

    /**
     *
     * @function
     * @param {Object} o
     */
    values: function(/**Object*/o)/**Array*/{
        var a = [];
        for (var k in o) {
            a.push(o[k]);
        }
        return a;
    }
};

exports.mix = mix;
exports.Array = Array;
exports.Object = Object;
